<?php
class C_settingreminder extends CI_Controller {
	function __construct(){
		parent::__construct();
		checkLogin();
		$this->load->model('m_settingreminder');
	}
	function index(){
		$task = secure_post('task');
		switch($task){
			case 'SAVE' :
				$this->_save();
				break;
			case 'RELOAD' :
				$this->_reload();
				break;
			default :
				$this->load->view('v_settingreminder',null);
		}
	}
	
	function _save(){
		$data['config_day'] = numeric_post("day");
		echo $this->m_settingreminder->_save($data);
	}
	
	function _reload(){
		echo $this->m_settingreminder->_reload();
	}
}